how to get logs per vhosts ?
how to get logs per vhosts ?
am 22.09.2009 14:00:13 von joydeep
Hello list,
In my linux server ( opensuse 11) , I am running apache with some
vhosts. All the virtual-hosts are running well. But the apache log
file is common for all the virtual hosts ; that is
/etc/var/log/apache/access.log. How can I get per vhost log so that I
can use awstat as well as monitor log for concerned vhost only ?
thanks.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: how to get logs per vhosts ?
am 22.09.2009 14:05:45 von g.p.t.m.geurts
Hello mr Bakshi,
You can define per vhost accesslogs by simply defining them.
If your vhost defenition contains a "CustomLog /var/log/logfile
logformat" directive, it will log all accesslog using LogFormat
logformat
to the file /var/log/logfile for that vhost.
Accesslogs not belonging to that vhost go to you global defined
accesslog
-----Original Message-----
From: J. Bakshi [mailto:joydeep@infoservices.in]=20
Sent: dinsdag 22 september 2009 14:00
To: users@httpd.apache.org
Subject: [users@httpd] how to get logs per vhosts ?
Hello list,
In my linux server ( opensuse 11) , I am running apache with some
vhosts. All the virtual-hosts are running well. But the apache log
file is common for all the virtual hosts ; that is
/etc/var/log/apache/access.log. How can I get per vhost log so that I
can use awstat as well as monitor log for concerned vhost only ?
thanks.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server
Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 22.09.2009 14:13:44 von joydeep
Geurts, G.P.T.M. wrote:
> Hello mr Bakshi,
> You can define per vhost accesslogs by simply defining them.
> If your vhost defenition contains a "CustomLog /var/log/logfile
> logformat" directive, it will log all accesslog using LogFormat
> logformat
> to the file /var/log/logfile for that vhost.
> Accesslogs not belonging to that vhost go to you global defined
> accesslog
>
Hello Sir,
Thanks a lot for your prompt solution and clarification.
I'll do it accordingly.
Once again thanking you.
> -----Original Message-----
> From: J. Bakshi [mailto:joydeep@infoservices.in]
> Sent: dinsdag 22 september 2009 14:00
> To: users@httpd.apache.org
> Subject: [users@httpd] how to get logs per vhosts ?
>
> Hello list,
>
> In my linux server ( opensuse 11) , I am running apache with some
> vhosts. All the virtual-hosts are running well. But the apache log
> file is common for all the virtual hosts ; that is
> /etc/var/log/apache/access.log. How can I get per vhost log so that I
> can use awstat as well as monitor log for concerned vhost only ?
>
> thanks.
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 22.09.2009 14:24:21 von joydeep
J. Bakshi wrote:
> Geurts, G.P.T.M. wrote:
>
>> Hello mr Bakshi,
>> You can define per vhost accesslogs by simply defining them.
>> If your vhost defenition contains a "CustomLog /var/log/logfile
>> logformat" directive, it will log all accesslog using LogFormat
>> logformat
>> to the file /var/log/logfile for that vhost.
>> Accesslogs not belonging to that vhost go to you global defined
>> accesslog
>>
>>
>
> Hello Sir,
>
> Thanks a lot for your prompt solution and clarification.
> I'll do it accordingly.
> Once again thanking you.
>
Well there is one side effect for the web hosting server. Generally
these type of servers host a huge no. of vhosts. And the CustomLog
options then creates a serious performance issue. To cope with that an
alternative is to log all the vhost at a common file and then break it
to different vhost specific logs. I am searching how to do that. any
help in that direction is always welcome.
thanks
>
>
>> -----Original Message-----
>> From: J. Bakshi [mailto:joydeep@infoservices.in]
>> Sent: dinsdag 22 september 2009 14:00
>> To: users@httpd.apache.org
>> Subject: [users@httpd] how to get logs per vhosts ?
>>
>> Hello list,
>>
>> In my linux server ( opensuse 11) , I am running apache with some
>> vhosts. All the virtual-hosts are running well. But the apache log
>> file is common for all the virtual hosts ; that is
>> /etc/var/log/apache/access.log. How can I get per vhost log so that I
>> can use awstat as well as monitor log for concerned vhost only ?
>>
>> thanks.
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
>>
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 22.09.2009 14:28:51 von Serge Fonville
--001636c5c286af59ed047429bde6
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I'd consider logging to a database instead
Read into mod_log_mysql
http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_log_sql-on-debian-etch
That should get you started.
It might require som fiddling...
HTH
Regards,
Serge Fonville
On Tue, Sep 22, 2009 at 2:24 PM, J. Bakshi wrote:
> J. Bakshi wrote:
> > Geurts, G.P.T.M. wrote:
> >
> >> Hello mr Bakshi,
> >> You can define per vhost accesslogs by simply defining them.
> >> If your vhost defenition contains a "CustomLog /var/log/logfile
> >> logformat" directive, it will log all accesslog using LogFormat
> >> logformat
> >> to the file /var/log/logfile for that vhost.
> >> Accesslogs not belonging to that vhost go to you global defined
> >> accesslog
> >>
> >>
> >
> > Hello Sir,
> >
> > Thanks a lot for your prompt solution and clarification.
> > I'll do it accordingly.
> > Once again thanking you.
> >
>
> Well there is one side effect for the web hosting server. Generally
> these type of servers host a huge no. of vhosts. And the CustomLog
> options then creates a serious performance issue. To cope with that an
> alternative is to log all the vhost at a common file and then break it
> to different vhost specific logs. I am searching how to do that. any
> help in that direction is always welcome.
>
> thanks
>
> >
> >
> >> -----Original Message-----
> >> From: J. Bakshi [mailto:joydeep@infoservices.in]
> >> Sent: dinsdag 22 september 2009 14:00
> >> To: users@httpd.apache.org
> >> Subject: [users@httpd] how to get logs per vhosts ?
> >>
> >> Hello list,
> >>
> >> In my linux server ( opensuse 11) , I am running apache with some
> >> vhosts. All the virtual-hosts are running well. But the apache log
> >> file is common for all the virtual hosts ; that is
> >> /etc/var/log/apache/access.log. How can I get per vhost log so that I
> >> can use awstat as well as monitor log for concerned vhost only ?
> >>
> >> thanks.
> >>
> >> ------------------------------------------------------------ ---------
> >> The official User-To-User support forum of the Apache HTTP Server
> >> Project.
> >> See for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >> ------------------------------------------------------------ ---------
> >> The official User-To-User support forum of the Apache HTTP Server
> Project.
> >> See for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >>
> >>
> >
> >
> > ------------------------------------------------------------ ---------
> > The official User-To-User support forum of the Apache HTTP Server
> Project.
> > See for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--001636c5c286af59ed047429bde6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi,
=A0
I'd consider logging to a database instead
=A0
Read into mod_log_mysql
se-with-mod_log_sql-on-debian-etch">http://www.howtoforge.co m/apache2-loggi=
ng-to-a-mysql-database-with-mod_log_sql-on-debian-etch
That should get you started.
It might require som fiddling...
=A0
HTH
=A0
Regards,
=A0
Serge Fonville
On Tue, Sep 22, 2009 at 2:24 PM, J. Bakshi
dir=3D"ltr"><
joydeep@infoser=
vices.in> wrote:
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
J. Bakshi wrote:
> Geurts, G.P.T.M. wrote:
><=
br>>> Hello mr Bakshi,
>> You can define per vhost accesslog=
s by simply defining them.
>> If your vhost defenition contains a =
"CustomLog /var/log/logfile
>> logformat" directive, it will log all accesslog using LogForm=
at
>> logformat
>> =A0to the file /var/log/logfile for th=
at vhost.
>> Accesslogs not belonging to that vhost go to you glob=
al defined
>> accesslog
>>
>>
>
> Hello Sir,
&g=
t;
> Thanks a lot for your prompt solution and clarification.
>=
I'll do it accordingly.
> Once again thanking you.
>
Well there is one side effect for the web hosting server. =A0Gene=
rally
these type of servers host a huge no. of vhosts. And the CustomLog=
options then creates a serious performance issue. =A0To cope with that =
an
alternative is to log all the vhost at a common file and then break it
t=
o different vhost specific logs. I am searching how to do that. any
help=
in that direction is always welcome.
thanks
>
>
>> -----Original Message-----
r>>> From: J. Bakshi [mailto:
n">joydeep@infoservices.in]
>> Sent: dinsdag 22 september 2009=
14:00
>> To:
users@httpd.apache.o=
rg>> Subject: [users@httpd] how to get logs per vhosts ?
&=
gt;>
>> Hello list,
>>
>> In my linux server =
( opensuse 11) , I am running apache with some
>> vhosts. =A0All the virtual-hosts are running well. =A0But the apac=
he log
>> file is common for all the virtual hosts ; that is
&g=
t;> /etc/var/log/apache/access.log. =A0How can I get per vhost log so th=
at I
>> can use awstat =A0as well as monitor log for concerned vhost only =
?
>>
>> thanks.
>>
>> -----------------=
----------------------------------------------------
>> The offici=
al User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:
g/userslist.html" target=3D"_blank">http://httpd.apache.org/userslist.html<=
/a>> for more info.
>> To unsubscribe, e-mail:
o:users-unsubscribe@httpd.apache.org">users-unsubscribe@http d.apache.org
>
>> =A0 =A0" =A0 from the digest:
unsubscribe@httpd.apache.org">users-digest-unsubscribe@httpd .apache.org=
>> For additional commands, e-mail:
httpd.apache.org">users-help@httpd.apache.org
>>
>>
>> ------------------------------------------=
---------------------------
>> The official User-To-User support f=
orum of the Apache HTTP Server Project.
>> See <URL:
http://httpd.apache.org/userslist.html" target=3D"_blank">http://httpd.apac=
he.org/userslist.html> for more info.
>> To unsubscribe, e-mail:
apache.org">users-unsubscribe@httpd.apache.org
>> =A0 =A0"=
; =A0 from the digest:
che.org">users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail:
d.apache.org">users-help@httpd.apache.org
>>
>>
&g=
t;>
>>
>
>
> --------------------------------=
-------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Proj=
ect.
> See <URL:
target=3D"_blank">http://httpd.apache.org/userslist.html> for more =
info.
> To unsubscribe, e-mail:
he.org">users-unsubscribe@httpd.apache.org
> =A0 =A0" =A0 fr=
om the digest:
>users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
ache.org">users-help@httpd.apache.org
>
>
>
r>---------------------------------------------------------- -----------
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>See <URL:
"_blank">http://httpd.apache.org/userslist.html> for more info.
T=
o unsubscribe, e-mail:
">users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest:
httpd.apache.org">users-digest-unsubscribe@httpd.apache.org
For addi=
tional commands, e-mail:
use=
rs-help@httpd.apache.org
--001636c5c286af59ed047429bde6--
Re: how to get logs per vhosts ?
am 22.09.2009 14:48:02 von Rich Bowen
--Apple-Mail-15-438575820
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit
On Sep 22, 2009, at 08:24 , J. Bakshi wrote:
>
> Well there is one side effect for the web hosting server. Generally
> these type of servers host a huge no. of vhosts. And the CustomLog
> options then creates a serious performance issue. To cope with that
> an
> alternative is to log all the vhost at a common file and then break it
> to different vhost specific logs. I am searching how to do that. any
> help in that direction is always welcome.
By adding the %v variable to the beginning of the LogFormat string,
you'll have the hostname as the first thing in the log entry. You can
then split the logs after the fact using the utility called split-
logfile that comes with Apache: http://httpd.apache.org/docs/2.2/programs/other.html
--
Rich Bowen
rbowen@rcbowen.com
--Apple-Mail-15-438575820
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
-webkit-line-break: after-white-space; ">
On Sep 22, 2009, =
at 08:24 , J. Bakshi wrote:
class=3D"Apple-style-span" color=3D"#000000">
Well there is =
one side effect for the web hosting server. Generally
these =
type of servers host a huge no. of vhosts. And the CustomLog
options =
then creates a serious performance issue. To cope with that =
an
alternative is to log all the vhost at a common file and then =
break it
to different vhost specific logs. I am searching how to do =
that. any
help in that direction is always =
welcome.
By adding the %v variable to =
the beginning of the LogFormat string, you'll have the hostname as the =
first thing in the log entry. You can then split the logs after the fact =
using the utility called split-logfile that comes with Apache:
href=3D"http://httpd.apache.org/docs/2.2/programs/other.html ">http://httpd=
..apache.org/docs/2.2/programs/other.html
=
class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-align: auto; text-indent: =
0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; ">
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; ">
--
Rich Bowen
href=3D"mailto:rbowen@rcbowen.com">rbowen@rcbowen.com
=
div>
=
=
--Apple-Mail-15-438575820--
Re: how to get logs per vhosts ?
am 22.09.2009 14:52:45 von joydeep
Serge Fonville wrote:
> Hi,
>
> I'd consider logging to a database instead
>
> Read into mod_log_mysql
> http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_log_sql-on-debian-etch
> That should get you started.
> It might require som fiddling...
>
> HTH
Hello,
Thanks for your feedback. I am trying to achieve the hosting company
style logging i.e.
1. per vhost base access and error log
2. awstat should work with the access logs.
3. Finally the performance should not fall due to huge no. of vhosts.
I think logging to a database might conflict with #3
>
> Regards,
>
> Serge Fonville
> On Tue, Sep 22, 2009 at 2:24 PM, J. Bakshi
> > wrote:
>
> J. Bakshi wrote:
> > Geurts, G.P.T.M. wrote:
> >
> >> Hello mr Bakshi,
> >> You can define per vhost accesslogs by simply defining them.
> >> If your vhost defenition contains a "CustomLog /var/log/logfile
> >> logformat" directive, it will log all accesslog using LogFormat
> >> logformat
> >> to the file /var/log/logfile for that vhost.
> >> Accesslogs not belonging to that vhost go to you global defined
> >> accesslog
> >>
> >>
> >
> > Hello Sir,
> >
> > Thanks a lot for your prompt solution and clarification.
> > I'll do it accordingly.
> > Once again thanking you.
> >
>
> Well there is one side effect for the web hosting server. Generally
> these type of servers host a huge no. of vhosts. And the CustomLog
> options then creates a serious performance issue. To cope with
> that an
> alternative is to log all the vhost at a common file and then break it
> to different vhost specific logs. I am searching how to do that. any
> help in that direction is always welcome.
>
> thanks
>
> >
> >
> >> -----Original Message-----
> >> From: J. Bakshi [mailto:joydeep@infoservices.in
> ]
> >> Sent: dinsdag 22 september 2009 14:00
> >> To: users@httpd.apache.org
> >> Subject: [users@httpd] how to get logs per vhosts ?
> >>
> >> Hello list,
> >>
> >> In my linux server ( opensuse 11) , I am running apache with some
> >> vhosts. All the virtual-hosts are running well. But the
> apache log
> >> file is common for all the virtual hosts ; that is
> >> /etc/var/log/apache/access.log. How can I get per vhost log so
> that I
> >> can use awstat as well as monitor log for concerned vhost only ?
> >>
> >> thanks.
> >>
> >>
> ------------------------------------------------------------ ---------
> >> The official User-To-User support forum of the Apache HTTP Server
> >> Project.
> >> See for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>
> >> " from the digest:
> users-digest-unsubscribe@httpd.apache.org
>
> >> For additional commands, e-mail: users-help@httpd.apache.org
>
> >>
> >>
> >>
> ------------------------------------------------------------ ---------
> >> The official User-To-User support forum of the Apache HTTP
> Server Project.
> >> See for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>
> >> " from the digest:
> users-digest-unsubscribe@httpd.apache.org
>
> >> For additional commands, e-mail: users-help@httpd.apache.org
>
> >>
> >>
> >>
> >>
> >
> >
> >
> ------------------------------------------------------------ ---------
> > The official User-To-User support forum of the Apache HTTP
> Server Project.
> > See for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>
> > " from the digest:
> users-digest-unsubscribe@httpd.apache.org
>
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> >
> >
> >
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 22.09.2009 14:56:04 von joydeep
Rich Bowen wrote:
>
> On Sep 22, 2009, at 08:24 , J. Bakshi wrote:
>>
>> Well there is one side effect for the web hosting server. Generally
>> these type of servers host a huge no. of vhosts. And the CustomLog
>> options then creates a serious performance issue. To cope with that an
>> alternative is to log all the vhost at a common file and then break it
>> to different vhost specific logs. I am searching how to do that. any
>> help in that direction is always welcome.
>
> By adding the %v variable to the beginning of the LogFormat string,
> you'll have the hostname as the first thing in the log entry. You can
> then split the logs after the fact using the utility called
> split-logfile that comes with
> Apache: http://httpd.apache.org/docs/2.2/programs/other.html
>
>
Hello Rich,
My thinking is also flowing on the same direction. I think we need a
cron to repeatedly generate ( and append ) the log. But still not
sufficient to produce real time log.
>
> --
> Rich Bowen
> rbowen@rcbowen.com
>
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: how to get logs per vhosts ?
am 22.09.2009 15:01:49 von g.p.t.m.geurts
Using syslog-ng you can log to different facilities and filter
acordingly, or you can filter by contense of the message, so a %v in the
LogFormat enables per vhost logging.=20
Don't know anything about the performance impact to the server though...
I know there is a BufferLog directive which enables to buffer a number
of messages...
-----Original Message-----
From: J. Bakshi [mailto:joydeep@infoservices.in]=20
Sent: dinsdag 22 september 2009 14:56
To: users@httpd.apache.org
Subject: Re: [users@httpd] how to get logs per vhosts ?
Rich Bowen wrote:
>
> On Sep 22, 2009, at 08:24 , J. Bakshi wrote:
>>
>> Well there is one side effect for the web hosting server. Generally=20
>> these type of servers host a huge no. of vhosts. And the CustomLog=20
>> options then creates a serious performance issue. To cope with that=20
>> an alternative is to log all the vhost at a common file and then=20
>> break it to different vhost specific logs. I am searching how to do=20
>> that. any help in that direction is always welcome.
>
> By adding the %v variable to the beginning of the LogFormat string,=20
> you'll have the hostname as the first thing in the log entry. You can=20
> then split the logs after the fact using the utility called=20
> split-logfile that comes with
> Apache: http://httpd.apache.org/docs/2.2/programs/other.html
>
>
Hello Rich,
My thinking is also flowing on the same direction. I think we need a
cron to repeatedly generate ( and append ) the log. But still not
sufficient to produce real time log.
>
> --
> Rich Bowen
> rbowen@rcbowen.com
>
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server
Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 22.09.2009 15:10:06 von Rich Bowen
--Apple-Mail-19-439899798
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit
On Sep 22, 2009, at 08:56 , J. Bakshi wrote:
> Rich Bowen wrote:
>>
>> On Sep 22, 2009, at 08:24 , J. Bakshi wrote:
>>>
>>> Well there is one side effect for the web hosting server. Generally
>>> these type of servers host a huge no. of vhosts. And the CustomLog
>>> options then creates a serious performance issue. To cope with
>>> that an
>>> alternative is to log all the vhost at a common file and then
>>> break it
>>> to different vhost specific logs. I am searching how to do that. any
>>> help in that direction is always welcome.
>>
>> By adding the %v variable to the beginning of the LogFormat string,
>> you'll have the hostname as the first thing in the log entry. You can
>> then split the logs after the fact using the utility called
>> split-logfile that comes with
>> Apache: http://httpd.apache.org/docs/2.2/programs/other.html
>>
>>
>
> Hello Rich,
>
> My thinking is also flowing on the same direction. I think we need a
> cron to repeatedly generate ( and append ) the log. But still not
> sufficient to produce real time log.
Then you have conflicting requirements. I think that logging to a
database - like the suggested mod_log_mysql - is the right way to do
it. Your assessment that logging to a database would be slower than
logging to the file system doesn't seem to be accurate. It's going to
be a lot faster.
--
Rich Bowen
rbowen@rcbowen.com
--Apple-Mail-19-439899798
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
-webkit-line-break: after-white-space; ">
On Sep 22, 2009, =
at 08:56 , J. Bakshi wrote:
class=3D"Apple-interchange-newline">
class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-align: auto; text-indent: =
0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; ">Rich Bowen wrote:
type=3D"cite">
On Sep 22, =
2009, at 08:24 , J. Bakshi wrote:
type=3D"cite">
type=3D"cite">
type=3D"cite">
Well there is one side effect =
for the web hosting server. =
Generally
type=3D"cite">
these type of servers host a =
huge no. of vhosts. And the =
CustomLog
type=3D"cite">
options then creates a serious =
performance issue. To cope with that =
an
type=3D"cite">alternative is to log all the vhost at a common file and =
then break it
type=3D"cite">
to different vhost specific =
logs. I am searching how to do that. =
any
type=3D"cite">help in that direction is always =
welcome.
type=3D"cite">
By adding the =
%v variable to the beginning of the LogFormat =
string,
you'll have the =
hostname as the first thing in the log entry. You =
can
then split the logs after =
the fact using the utility called
type=3D"cite">split-logfile that comes with
type=3D"cite">Apache:
=
href=3D"http://httpd.apache.org/docs/2.2/programs/other.html ">http://httpd=
..apache.org/docs/2.2/programs/other.html
type=3D"cite">
type=3D"cite">
Hello Rich,
My thinking is =
also flowing on the same direction. I think we need a
cron to =
repeatedly generate ( and append ) the log. But still not
sufficient =
to produce real time log.
Then you =
have conflicting requirements. I think that logging to a database - like =
the suggested mod_log_mysql - is the right way to do it. Your assessment =
that logging to a database would be slower than logging to the file =
system doesn't seem to be accurate. It's going to be a lot =
faster.
class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-align: auto; text-indent: =
0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; ">
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; ">
--
Rich Bowen
href=3D"mailto:rbowen@rcbowen.com">rbowen@rcbowen.com
=
div>
=
=
--Apple-Mail-19-439899798--
Log to DBMS other than MySQL? [was Re: how to get logs per vhosts?]
am 22.09.2009 16:04:35 von mwood
--7gGkHNMELEOhSGF6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Sep 22, 2009 at 02:28:51PM +0200, Serge Fonville wrote:
> I'd consider logging to a database instead
>=20
> Read into mod_log_mysql
> http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_lo=
g_sql-on-debian-etch
So, are there any log-to-dbms modules for Apache HTTPD out there that
do *not* demand MySQL?
Not wishing to start an offtopic flamewar, but I already have
PostgreSQL installed for some years, am comfortable with it, and
wouldn't like to drag another whole DBMS in for one simple
application. (There are probably some users of Oracle, DB/2, and the
like who would be interested as well.)
--=20
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
Friends don't let friends publish revisable-form documents.
--7gGkHNMELEOhSGF6
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
iEYEAREDAAYFAkq42XMACgkQs/NR4JuTKG/q2QCfUA7fWXoocqOqdjVsEics gRAc
AAgAnjVG7R/4DpiANs2FzPM0cryJEv/M
=/JnS
-----END PGP SIGNATURE-----
--7gGkHNMELEOhSGF6--
Re: Log to DBMS other than MySQL? [was Re: how to get
am 22.09.2009 16:10:06 von Serge Fonville
--001636ed6980cc9a1a04742b27d4
Content-Type: text/plain; charset=ISO-8859-1
On Tue, Sep 22, 2009 at 4:04 PM, Mark H. Wood wrote:
> On Tue, Sep 22, 2009 at 02:28:51PM +0200, Serge Fonville wrote:
> > I'd consider logging to a database instead
> >
> > Read into mod_log_mysql
> >
> http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_log_sql-on-debian-etch
>
> So, are there any log-to-dbms modules for Apache HTTPD out there that
> do *not* demand MySQL?
Mod_log_sql is considered pgsql 'compatible'
But again, it requires fiddling
HTH
Regards,
Serge fonville
>
> Not wishing to start an offtopic flamewar, but I already have
> PostgreSQL installed for some years, am comfortable with it, and
> wouldn't like to drag another whole DBMS in for one simple
> application. (There are probably some users of Oracle, DB/2, and the
> like who would be interested as well.)
>
> --
> Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
> Friends don't let friends publish revisable-form documents.
>
--001636ed6980cc9a1a04742b27d4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Tue, Sep 22, 2009 at 4:04 PM, Mark H. Wood
pan dir=3D"ltr"><&=
gt; wrote:
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Tue, Sep 22, 2009 at 02:28:51=
PM +0200, Serge Fonville wrote:
> I'd consider logging to a datab=
ase instead
>
> Read into mod_log_mysql
>
ge.com/apache2-logging-to-a-mysql-database-with-mod_log_sql- on-debian-etch"=
target=3D"_blank">http://www.howtoforge.com/apache2-logging- to-a-mysql-dat=
abase-with-mod_log_sql-on-debian-etch
So, are there any log-to-dbms modules for Apache HTTPD out there that
r>do *not* demand MySQL?
=A0
Mod_log_sql is considered pgsql 'compatible'
But again, it requires fiddling
=A0
HTH
=A0
Regards,
=A0
Serge fonville
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
Not wishing to start an offt=
opic flamewar, but I already have
PostgreSQL installed for some years, a=
m comfortable with it, and
wouldn't like to drag another whole DBMS in for one simple
applicati=
on. =A0(There are probably some users of Oracle, DB/2, and the
like who =
would be interested as well.)
--
Mark H. =
Wood, Lead System Programmer =A0 mwood@IUPUI.Edu
Friends don't let friends publish revisable-form documents.
<=
/blockquote>
--001636ed6980cc9a1a04742b27d4--
Re: Log to DBMS other than MySQL? [was Re: how toget logs per vhosts ?]
am 22.09.2009 16:24:53 von Tom Evans
On Tue, 2009-09-22 at 10:04 -0400, Mark H. Wood wrote:
> On Tue, Sep 22, 2009 at 02:28:51PM +0200, Serge Fonville wrote:
> > I'd consider logging to a database instead
> >
> > Read into mod_log_mysql
> > http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_log_sql-on-debian-etch
>
> So, are there any log-to-dbms modules for Apache HTTPD out there that
> do *not* demand MySQL?
>
> Not wishing to start an offtopic flamewar, but I already have
> PostgreSQL installed for some years, am comfortable with it, and
> wouldn't like to drag another whole DBMS in for one simple
> application. (There are probably some users of Oracle, DB/2, and the
> like who would be interested as well.)
>
mod_log_sql alleges to support postgres using dbi, which would
presumably mean adding support for any other DB that has a dbi module is
trivial.
Usually the reason why something doesn't exist is that no-one cares
enough to write it.
Cheers
Tom
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Log to DBMS other than MySQL? [was Re: how to getlogs per vhosts ?]
am 22.09.2009 17:04:02 von Nick Kew
Mark H. Wood wrote:
> On Tue, Sep 22, 2009 at 02:28:51PM +0200, Serge Fonville wrote:
>> I'd consider logging to a database instead
>>
>> Read into mod_log_mysql
>> http://www.howtoforge.com/apache2-logging-to-a-mysql-databas e-with-mod_log_sql-on-debian-etch
>
> So, are there any log-to-dbms modules for Apache HTTPD out there that
> do *not* demand MySQL?
Erm, any DBD-based solution gives you a choice of backend. An article
describing it with mysql is either old (pre-Apache-2.2) or simply
describing exactly what its author did.
> Not wishing to start an offtopic flamewar, but I already have
> PostgreSQL installed for some years, am comfortable with it, and
> wouldn't like to drag another whole DBMS in for one simple
> application. (There are probably some users of Oracle, DB/2, and the
> like who would be interested as well.)
We don't have DB/2 yet (unless you can use it through something
like ODBC), but your other candidates are all supported.
--
Nick Kew
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 23.09.2009 16:20:06 von Matus UHLAR - fantomas
On 22.09.09 17:30, J. Bakshi wrote:
> In my linux server ( opensuse 11) , I am running apache with some
> vhosts. All the virtual-hosts are running well. But the apache log
> file is common for all the virtual hosts ; that is
> /etc/var/log/apache/access.log. How can I get per vhost log so that I
> can use awstat as well as monitor log for concerned vhost only ?
you can define CustomLog (or TransferLog) directive in each virtual host.
However I don't recommend that one - many logfiles slows down starting and
reloading apache since all log files need to be reopened.
You also can't do it for dynamic virtual hosts, for that you need to log to
a program that will split logs based on virtual host provided.
BTW, awstats is able to extract virtual host logs from common log, so for
awstats you don't need to use more logfiles.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Silvester Stallone: Father of the RISC concept.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: how to get logs per vhosts ?
am 23.09.2009 16:34:12 von joydeep
Matus UHLAR - fantomas wrote:
> On 22.09.09 17:30, J. Bakshi wrote:
>
>> In my linux server ( opensuse 11) , I am running apache with some
>> vhosts. All the virtual-hosts are running well. But the apache log
>> file is common for all the virtual hosts ; that is
>> /etc/var/log/apache/access.log. How can I get per vhost log so that I
>> can use awstat as well as monitor log for concerned vhost only ?
>>
>
> you can define CustomLog (or TransferLog) directive in each virtual host.
> However I don't recommend that one - many logfiles slows down starting and
> reloading apache since all log files need to be reopened.
>
> You also can't do it for dynamic virtual hosts, for that you need to log to
> a program that will split logs based on virtual host provided.
>
> BTW, awstats is able to extract virtual host logs from common log, so for
> awstats you don't need to use more logfiles.
>
>
I appreciate your response. even I am also very much bother to provide
CustomLog as the server is hosting a no. of vhost. Glad to know that
awstat can simply extract the required info from common log and no
special attention is required. still need the error/access log per vhost
which are very helpful when debugging is required.
Any idea/approach in that direction is very much welcome.
Thanks
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org